package main

import (
	"fmt"
	"log"
)

func doMath(passfunction func(int, int) float64) (f float64, err error) {
	result := passfunction(10, 2)
	return result, nil

}

func divide(a, b int) float64 {
	return float64(a) / float64(b)
}

func multiply(a, b int) float64 {
	return float64(a * b)
}

func main() {
	a, err := doMath(divide)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(a)

	b, err := doMath(multiply)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(b)

}
